﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using GrayParrot.Web.Formly;

namespace ConsoleApplication1
{
    public class TestExpressionPropertiesMetadata
    {
        /* test campo singolo */
        //[AddOn(Position = Position.Right, Text = "Pz")]
        //[FormFieldAttribute(Type = FormFieldTypes.Number)]
        //[NumericTemplateOptions(Label = "Q.ta Grz.", Placeholder = "", Required = true, Disabled = false)]
        //public decimal Quantita2 { get; set; }

        /* test campi organizzati su colonne */
        [Events(Event = EventTypes.OnChange, Callback = "CambiaFoto")]
        [FieldGroup(GroupName = "primo", Row = 1, Index = 1, NumberOfColumns = 3)]
        [FormFieldAttribute(Type = FormFieldTypes.Number)]
        [NumericTemplateOptions(Label = "Q.ta Grz.", Placeholder = "", Required = true, Disabled = false)]
        public Guid Articolo { get; set; }

        [Events(Event = EventTypes.OnChange, Callback = "CambiaFoto")]
        [FieldGroup(GroupName = "primo", Row = 1, Index = 2, NumberOfColumns = 3)]
        [FormFieldAttribute(Type = FormFieldTypes.Number)]
        [NumericTemplateOptions(Label = "Q.ta Grz.", Placeholder = "", Required = true, Disabled = false)]
        public Guid CodiceFornitore { get; set; }

        [AddOn(Position = Position.Right, Text = "Pz")]
        [FieldGroup(GroupName = "terzo", Row = 2, Index = 1, NumberOfColumns = 3)]
        [FormFieldAttribute(Type = FormFieldTypes.Number)]
        [NumericTemplateOptions(Label = "Q.ta Grz.", Placeholder = "", Required = true, Disabled = false)]
        public decimal Quantita { get; set; }

        [AddOn(Position = Position.Right, Text = "Pz")]
        [FieldGroup(GroupName = "terzo", Row = 2, Index = 2, NumberOfColumns = 3)]
        [FormFieldAttribute(Type = FormFieldTypes.Number)]
        [NumericTemplateOptions(Label = "Q.ta Fatt.", Placeholder = "", Required = true, Disabled = false)]
        public decimal QtaFatt { get; set; }
    }
}
